namespace Users {
    	using System;
    	
    	
    	/// <summary>
    	/// 表名：uc_UserSns 主键列：UserId,SnsId,SnsType
    	/// </summary>
    	[SerializableAttribute()]
    	public partial class _UserSns : MySoft.Data.Entity {
    		
    		protected Int32 _UserId;
    		
    		protected String _SnsId;
    		
    		protected Int32 _SnsType;
    		
    		protected DateTime _CreationTime;
    		
    		protected String _AccessToken;
    		
    		protected String _SnsNick;
    		
    		public Int32 UserId {
    			get {
    				return this._UserId;
    			}
    			set {
    				this.OnPropertyValueChange(_.UserId, _UserId, value);
    				this._UserId = value;
    			}
    		}
    		
    		public String SnsId {
    			get {
    				return this._SnsId;
    			}
    			set {
    				this.OnPropertyValueChange(_.SnsId, _SnsId, value);
    				this._SnsId = value;
    			}
    		}
    		
    		public Int32 SnsType {
    			get {
    				return this._SnsType;
    			}
    			set {
    				this.OnPropertyValueChange(_.SnsType, _SnsType, value);
    				this._SnsType = value;
    			}
    		}
    		
    		public DateTime CreationTime {
    			get {
    				return this._CreationTime;
    			}
    			set {
    				this.OnPropertyValueChange(_.CreationTime, _CreationTime, value);
    				this._CreationTime = value;
    			}
    		}
    		
    		public String AccessToken {
    			get {
    				return this._AccessToken;
    			}
    			set {
    				this.OnPropertyValueChange(_.AccessToken, _AccessToken, value);
    				this._AccessToken = value;
    			}
    		}
    		
    		public String SnsNick {
    			get {
    				return this._SnsNick;
    			}
    			set {
    				this.OnPropertyValueChange(_.SnsNick, _SnsNick, value);
    				this._SnsNick = value;
    			}
    		}
    		
    		/// <summary>
    		/// 获取实体对应的表名
    		/// </summary>
    		protected override MySoft.Data.Table GetTable() {
    			return new MySoft.Data.Table<_UserSns>("uc_UserSns");
    		}
    		
    		/// <summary>
    		/// 获取实体中的主键列
    		/// </summary>
    		protected override MySoft.Data.Field[] GetPrimaryKeyFields() {
    			return new MySoft.Data.Field[] {
    					_.UserId,
    					_.SnsId,
    					_.SnsType};
    		}
    		
    		/// <summary>
    		/// 获取列信息
    		/// </summary>
    		protected override MySoft.Data.Field[] GetFields() {
    			return new MySoft.Data.Field[] {
    					_.UserId,
    					_.SnsId,
    					_.SnsType,
    					_.CreationTime,
    					_.AccessToken,
    					_.SnsNick};
    		}
    		
    		/// <summary>
    		/// 获取列数据
    		/// </summary>
    		protected override object[] GetValues() {
    			return new object[] {
    					this._UserId,
    					this._SnsId,
    					this._SnsType,
    					this._CreationTime,
    					this._AccessToken,
    					this._SnsNick};
    		}
    		
    		/// <summary>
    		/// 给当前实体赋值
    		/// </summary>
    		protected override void SetValues(MySoft.Data.IRowReader reader) {
    			if ((false == reader.IsDBNull(_.UserId))) {
    				this._UserId = reader.GetInt32(_.UserId);
    			}
    			if ((false == reader.IsDBNull(_.SnsId))) {
    				this._SnsId = reader.GetString(_.SnsId);
    			}
    			if ((false == reader.IsDBNull(_.SnsType))) {
    				this._SnsType = reader.GetInt32(_.SnsType);
    			}
    			if ((false == reader.IsDBNull(_.CreationTime))) {
    				this._CreationTime = reader.GetDateTime(_.CreationTime);
    			}
    			if ((false == reader.IsDBNull(_.AccessToken))) {
    				this._AccessToken = reader.GetString(_.AccessToken);
    			}
    			if ((false == reader.IsDBNull(_.SnsNick))) {
    				this._SnsNick = reader.GetString(_.SnsNick);
    			}
    		}
    		
    		public override int GetHashCode() {
    			return base.GetHashCode();
    		}
    		
    		public override bool Equals(object obj) {
    			if ((obj == null)) {
    				return false;
    			}
    			if ((false == typeof(_UserSns).IsAssignableFrom(obj.GetType()))) {
    				return false;
    			}
    			if ((((object)(this)) == ((object)(obj)))) {
    				return true;
    			}
    			return false;
    		}
    		
    		public class _ {
    			
    			/// <summary>
    			/// 表示选择所有列，与*等同
    			/// </summary>
    			public static MySoft.Data.AllField All = new MySoft.Data.AllField<_UserSns>();
    			
    			/// <summary>
    			/// 字段名：UserId - 数据类型：Int32
    			/// </summary>
    			public static MySoft.Data.Field UserId = new MySoft.Data.Field<_UserSns>("UserId");
    			
    			/// <summary>
    			/// 字段名：SnsId - 数据类型：String
    			/// </summary>
    			public static MySoft.Data.Field SnsId = new MySoft.Data.Field<_UserSns>("SnsId");
    			
    			/// <summary>
    			/// 字段名：SnsType - 数据类型：Int32
    			/// </summary>
    			public static MySoft.Data.Field SnsType = new MySoft.Data.Field<_UserSns>("SnsType");
    			
    			/// <summary>
    			/// 字段名：CreationTime - 数据类型：DateTime
    			/// </summary>
    			public static MySoft.Data.Field CreationTime = new MySoft.Data.Field<_UserSns>("CreationTime");
    			
    			/// <summary>
    			/// 字段名：AccessToken - 数据类型：String
    			/// </summary>
    			public static MySoft.Data.Field AccessToken = new MySoft.Data.Field<_UserSns>("AccessToken");
    			
    			/// <summary>
    			/// 字段名：SnsNick - 数据类型：String
    			/// </summary>
    			public static MySoft.Data.Field SnsNick = new MySoft.Data.Field<_UserSns>("SnsNick");
    		}
    	}
    }
    